﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Upreader.Application.Model;

namespace Upreader.Application
{
    /// <summary>
    /// Common query extensions
    /// </summary>
    public static class IApplicationServiceExtensions
    {
        public static IEnumerable<Download> GetDownloads(this IApplicationService service)
        {
            if (service == null)
                throw new ArgumentNullException("service");

            return service.GetDownloads(null);
        }

        public static IEnumerable<Server> GetServers(this IApplicationService service)
        {
            if (service == null)
                throw new ArgumentNullException("service");

            return service.GetServers(null);
        }
    }
}
